﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Tests
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            bool b;
            WindowsFormsApplication1.Sudoku field = Sudoku.Tests.FieldGenerator.SampleField();
           b= field.SetValue(1, 1, 6);

            Assert.AreEqual(b, true);
        }
         [TestMethod]
        public void Prove_Dublicates()
        {
             bool b=true;
          WindowsFormsApplication1.Sudoku field = Sudoku.Tests.FieldGenerator.SampleField();

            b=field.SetValue(0, 0, 4);

            Assert.AreEqual(b,false);
        }

        [TestMethod]
        [ExpectedException(typeof(IndexOutOfRangeException))]
        public void Out_of_Range_value()
        {
            WindowsFormsApplication1.Sudoku field = Sudoku.Tests.FieldGenerator.SampleField();

            field.SetValue(-1, -1, 4);
        }
        [TestMethod]
        public void if_liNull_insert()
        {
            bool[,] b;
            WindowsFormsApplication1.Sudoku field = Sudoku.Tests.FieldGenerator.SampleField();
            b = field.BoolCreate(field.Mas);
            Assert.AreEqual(b[1, 1], true);
        }
        [TestMethod]
        public void if_number_insert()
        {
            bool[,] b;
            WindowsFormsApplication1.Sudoku field = Sudoku.Tests.FieldGenerator.SampleField();
            b = field.BoolCreate(field.Mas);
            Assert.AreEqual(b[0, 1], false);
        }

    }
}
